package com.kimwu.design.facade.facade;

import com.kimwu.design.facade.children.Cpu;
import com.kimwu.design.facade.children.Disk;
import com.kimwu.design.facade.children.Memory;
import lombok.extern.slf4j.Slf4j;
import sun.plugin2.gluegen.runtime.CPU;

/**
 * 门面类（核心）
 * @author Administrator
 *
 */
@Slf4j
public class Computer
{

    private Cpu cpu;
    private Memory memory;
    private Disk disk;
    public Computer()
    {
        cpu = new Cpu();
        memory = new Memory();
        disk = new Disk();
    }
    public void start()
    {
        log.info("Computer start begin");
        cpu.start();
        disk.start();
        memory.start();
        log.info("Computer start end");
    }

    public void shutDown()
    {
        log.info("Computer shutDown begin");
        cpu.shutDown();
        disk.shutDown();
        memory.shutDown();
        log.info("Computer shutDown end...");
    }
}